package com.kc.business.domain;

import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 商家代金券实体
 */
@Data
@Table(name = "kc_business_coupon")
public class BizBusinessCoupon {
    @Id
   /*主键id*/
    private Integer id;
    /*商家id*/
    @NotNull(message = "商家id错误")
    @Min(value = 1,message = "商家id错误")
    private Integer businessId;
    /*代金券名称*/
    @NotBlank(message = "代金券名称")
    private String couponName;
    /*代金券金额*/
    @NotNull(message = "代金券金额错误")
    @Min(value = 1,message = "代金券金额错误")
    private Double couponMoney;
    /*代金券限制金额(无限制传0)*/
    //@NotNull(message = "代金券限制金额错误")
    @Min(value = 0,message = "代金券限制金额错误")
    private Double limitMoney;
    /*代金券有效期开始时间*/
    @NotBlank(message = "代金券有效期开始时间错误")
    private String startTime;
    /*代金券有效期结束时间*/
    @NotBlank(message = "代金券有效期结束时间错误")
    private String endTime;
    /*状态(1上线，0下架)*/
    private Integer status = 1;
    /*库存*/
    @NotNull(message = "库存错误")
    @Min(value = 1,message = "库存错误")
    private Integer stock;
    /*删除标识(1删除，0未删除)*/
    private Integer isDeleted = 0;
    /*是否设置门槛*/
    private Integer isLimitMoney = 0;
}
